﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace L4View.BusinessModel.Parsers
{
    public class DummyParser : MessageParser
    {
        public override void Parse(string text)
        {
            try
            {
                var lines = text.Split('\n');

                for (int i = 0; i < lines.Length; i++)
                    lines[i] = lines[i].Replace("\r", string.Empty);

                foreach (var line in lines)
                    Sink.PutMessage(new DummyLogMessage(line));
                    
            }
            catch
            {
            }
        }

        private class DummyLogMessage : ILogMessage
        {
            private string _line;

            public DummyLogMessage(string line)
            {
                _line = line;
            }
        }
    }
}
